package parser;

import se.lth.cs.srl.CompletePipeline;
import se.lth.cs.srl.options.CompletePipelineCMDLineOptions;
import se.lth.cs.srl.options.FullPipelineOptions;

public class LTHSRLPipeline extends ParserPipeline {
	CompletePipeline pipeline;

	public LTHSRLPipeline(String modelDir) throws Exception {
		FullPipelineOptions options = new CompletePipelineCMDLineOptions();
		String[] optionString = new String[] { "eng", "-tokenize", "-token",
				modelDir + "/EnglishTok.bin.gz", "-lemma",
				modelDir + "/lemma-eng.model", "-tagger",
				modelDir + "/tag-eng.model", "-parser",
				modelDir + "/prs-eng.model", "-srl",
				modelDir + "/srl-eng.model" };
		options.parseCmdLineArgs(optionString);
		pipeline = CompletePipeline.getCompletePipeline(options);
	}

	@Override
	public ParserAnnotation make(String document) {
		return new LTHSRLAnnotation(pipeline, document);
	}
}
